import { Component, OnInit } from '@angular/core';
import { UserService } from "../service/user.service";
import { User } from '../manager-system/hero';

@Component({
  selector: 'app-staff-attendance',
  templateUrl: './staff-attendance.component.html',
  styleUrls: ['./staff-attendance.component.css']
})
export class StaffAttendanceComponent implements OnInit {

  // user: User() = this.UserService.sharedUser;

  constructor(private userService: UserService) { 
    
  }

  getUserID() {
    return this.userService.sharedUser.username
  }

  getUserName() {
    return this.userService.sharedUser.name
  }

  getUserYearsHoliday() {
    return this.userService.sharedUser.annualLeave
  }

  getPosition() {
    return this.userService.sharedUser.position
  }

  getDepartment() {
    return this.userService.sharedUser.department
  }
  // quit() {
  //   this.userService.sharedUser = new User();
  // }
  ngOnInit() {
  }

}
